package com.coders.silpa;

public class methodoverloadingExample {
	void add(){
		int a=20,b=5;
		System.out.println("Addition without parameters"+(a+b));
		
	}
	void add(int a, int b){
		 int x=a;
		 int y=b;
		 
		System.out.println("Addition with two parameters"+(x+y));
	}
	double add(double d){
		d=d+d;
		return d;
		
		
	}
	public static void main(String args[]){
		double result;
		methodoverloadingExample obj1=new methodoverloadingExample();
		obj1.add();
		obj1.add(11,11);
		result=obj1.add(20.5);
		System.out.println("Addition returning a double"+result);

		
		
	}

}
